using System.Collections.Generic;
using Admin.NET.Core;
using SqlSugar;

namespace Admin.NET.Application.Entity;

[SugarTable("Building", "区域")]
[SysTable]
public class Building : EntityTenant
{
	/// <summary>
	/// 区域名称
	/// </summary>
	[SugarColumn(ColumnDataType = "text")]
	public string Name { get; set; }

	[SugarColumn(ColumnDataType = "text")]
	public string? Remark { get; set; }

	/// <summary>
	/// 父节点id
	/// </summary>
	[SugarColumn(DefaultValue = "0")]
	public long Pid { get; set; }

	/// <summary>
	/// 区域子项
	/// </summary>
	[SugarColumn(IsIgnore = true)]
	public List<Building> Children { get; set; } = new List<Building>();

}
